<template>
  <div class="recovery" v-if="list">
    <nav-top
      class="navTop"
      Licon="back"
      title="序列号回收详情"
      @callback="goBack"
    />
    <div class="detailContent">
      <div class="item flex " v-for="(item, i) in list" :key="i">
        <div class="label">{{ item.label }}</div>
        <div class="value wspl">{{ item.value }}</div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "Recovery",
  components: {},
  data() {
    return {
        list: [
        // { label: "序列号：", value: "" },
        // { label: "会员卡名称", value:"" },
        // { label: "会员价格：", value: "" },
        // { label: "批次编号", value: "" },
        // { label: "新批次名称", value: "" },
        // { label: "新批次价格", value: "" },
        // { label: "新负责人", value: "" },
        // { label: "分配新学校", value: ""},
        // { label: "备注", value: ""}
      ]
    };
  },
  computed: {},
  watch: {},
  methods: {
    // 返回
    goBack(val) {
      if (val == "back") {
        this.$router.go(-1);
      }
    }
  },
  created() {
    // console.log(this.$route.params.id);
    this.Http.seeRecoveryInfo({
        id:this.$route.params.id
    }).then(res=>{
        // console.log(res);
        this.list = [
        { label: "序列号:", value: res.info.serial },
        { label: "会员卡名称:", value:res.info.pname },
        { label: "会员价格:", value: res.info.present_price },
        { label: "批次编号:", value: res.info.id },
        { label: "新批次名称:", value: res.info.name },
        { label: "新批次价格:", value: res.info.present_price },
        { label: "新负责人:", value: res.info.xname },
        { label: "分配新学校:", value: res.info.school_name},
        { label: "备注:", value: res.info.remark?res.info.remark:'无'}
      ]
    })
  },
  mounted() {}
};
</script>
<style lang="less" scoped>
.detail {
  background-color: #fff;
  color: #999;
}
.detailContent {
  padding: 20px 58px;
  font-size: 36px;
  line-height: 2;
}
.label {
  width: 220px;
}
.value {
  width: 450px;
  color: #222;
}
</style>
